<template>
	<view>
		<image src="../../../static/notice.png" style="width: 100%; height: 240rpx;"></image>
			<scroll-view class="reply-scroll-view" scroll-y="true" >
					<view v-for="item in commentlist">
						<view class="item-box flex-js-ac">
							
							<view class="nick-class">
								{{item.user.nickname}}给你发来消息！
	
							</view>
						</view>
						<view class="reply-text-class">
							{{item.content}}
						
						</view>
						<view class="reply-text-class">
							{{item.createTime}}
						</view>
						<view class="border-class2">
							
						</view>
					</view>
					
					
			</scroll-view>
		
	</view>
</template>

<script>
	import md5 from "../../../md5.js"
	export default {
		data() {
			return {
				
				commentlist:[
					{usernickname:"用户昵称",
					content:"8888888888",
					createTime:"2020-8-9"},
					
					{usernickname:"用户昵称",
					content:"8888888888",
					createTime:"2020-8-9"},
					
					{usernickname:"用户昵称",
					content:"8888888888",
					createTime:"2020-8-9"},
					
					
					
					
					],
				
				
				tag: [], // 标签tag
				reply:[], // 评论列表
			}
		},
		onLoad(){
				  console.log("进入通知页面")
				  // console.log("当前id:"+this.$store.state.id)
				  // console.log("当前token:"+this.$store.state.token)
				  uni.request({
				  	  	method:'GET',
				  	  	url:"http://47.97.114.13:8080/api/notify/list",
					  header: {
					  	   // "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoiTk9STUFMIiwiaWQiOiIxIiwiZXhwIjoxNjkwNTMzNzQzfQ.xIb3t5ouSMjvqrrfmK2ehq5m53MhaMPtjn8kXyCeEs8",//this.$store.state.token,
					  	  "Authorization": this.$store.state.token, 
					  },
				  	  })
				  	  .then(res => {
						 // console.log(res);
				  		  console.log(res[1].data.data);
						  if(res[1].data.success===true)
						  {
						  	this.commentlist = res[1].data.data.list
		
						  }
						  else{
						  	uni.showToast({
						  	  title: "获取通知列表失败",
						  	  icon: "fail"
						  	});
						  }
		
				  	  })
			      },
		
				  onPullDownRefresh(){
				  		  console.log("刷新通知页面")
				  uni.request({
				  	  	method:'GET',
				  	  	url:"http://47.97.114.13:8080/api/notify/list",
					  header: {
					  	   // "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoiTk9STUFMIiwiaWQiOiIxIiwiZXhwIjoxNjkwNTMzNzQzfQ.xIb3t5ouSMjvqrrfmK2ehq5m53MhaMPtjn8kXyCeEs8",//this.$store.state.token,
					  	  "Authorization": this.$store.state.token, 
					  },
				  	  })
				  	  .then(res => {
						  //console.log(res);
				  		  console.log(res[1].data.data);
						if(res[1].data.success===true)
						{
								this.commentlist = res[1].data.data.list
		
						}
						else{
							uni.showToast({
							  title: "获取通知列表失败",
							  icon: "fail"
							});
						}
				  	  })
							  uni.stopPullDownRefresh()
				  	      },
		}
			
</script>

<style>

	.text-class {
		margin-top: 10rpx;
		color: #8b8b8b;
		font-size: 20rpx;
	}

	.border-class {
		width: 100%;
		height: 4rpx;
		background-color: #EEEEEE;
		margin-top: 25rpx;
	}
	.reply-scroll-view{
		width: 100%;
	}
	.item-box{
		margin-top: 25rpx;
	}
	.item-box>image{
		height: 65rpx;
		width: 65rpx;
		border-radius: 100%;
		margin-left: 25rpx;
	}
	.nick-class{
		color: #808080;
		font-size: 28rpx;
		font-weight: bold;
		margin-left: 15rpx;
	}
	.reply-text-class{
		color: #2F2F2F;
		font-size: 25rpx;
		margin-left: 20rpx;
		margin-top: 15rpx;
	}
	.border-class2{
		margin-top: 25rpx;
		height: 2rpx;
		width: 100%;
		background-color: #C0C0C0;
	}
	.zhanwei-class{
		height: 600rpx;
		width: 100%;
	}
	.container {
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	}
	.nav {
	  display: flex;
	  justify-content: space-between;
	  align-items: center;
	  width: 100%;
	  height: 80rpx;
	  padding-left: 20rpx;
	  padding-right: 20rpx;
	  background-color: #ffffff;
	}
	.logo {
	  font-size: 36rpx;
	  font-weight: bold;
	}
	.search-box {
	   width :80%; 
	   height :60rpx; 
	   margin-left :10rpx; 
	   margin-right :10rpx; 
	   border-radius :30rpx; 
	   background-color :#f0f0f0
	}
	.search-input {
	   width :100%; 
	   height :60rpx; 
	   border :none; 
	   outline :none; 
	   padding-left :20rpx; 
	   padding-right :20rpx
	}
	.swiper {
	  width: 100%;
	  height: 400rpx;
	}
	.banner {
	  width: 100%;
	  height: 400rpx;
	}
	.category {
	   display :flex; 
	   text-align: center;
	   width :100%; 
	   height :80rpx; 
	   background-color :#ffffff;
	   margin-top: 10rpx;
	}
	.item {
	   font-size :35rpx; 
	   margin :10rpx; 
	   color :#999999
	}
	.active {
	   color :#ff0000
	}
	.video-list {
	   width :95%;
	   margin: 0 auto;
	}
	.video-container{
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
	}
	.video-item {
	   width: 49%;
	   margin-bottom: 2px;
	}
	.cover {
	   width :100%; 
	   height :300rpx
	}
	.text-container {
	    display: flex;
	    flex-direction: column;
	    padding-left: 10rpx;
	    padding-right: 10rpx;
	    padding-bottom: 10rpx;
	}
	.title {
	   font-size :28rpx; 
	   padding-left :10rpx; 
	   padding-right :10rpx
	}
	.info {
	   font-size :24rpx; 
	   color :#999999; 
	   padding-left :10rpx; 
	   padding-right :10rpx; 
	   padding-bottom :10rpx
	}
</style>